Repository navigation
fix(storage): refuse bucket URLs naming no object directly in fetch_uri (#435) - #438
Merged
kstonekuan merged 2 commits intoSep 6, 2026
Conversation
|
👋 Hi @Cid-oe — thank you so much for your first contribution to HFlow! A maintainer will review your pull request as soon as possible. In the meantime:
💡 Tip: one open pull request per contributor at a time. Issues with an assignee are taken; everything else is fair game. We are excited to have you here and appreciate your help making the project better! 🙌 |
This was referenced Sep 6, 2026
kstonekuan
approved these changes
Sep 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Resolves #435.
Ensures
fetch_uriexplicitly validates and refuses bucket URLs that name no object before delegating toBucketStorageRoot, returning an error citing the exact URI supplied by the caller instead of a truncated prefix.Changes
src/hflow/storage.py: checked that the bucket URL contains an object segment after the bucket/container before delegating toBucketStorageRoot.tests/test_storage.py: addedtest_bucket_uri_naming_no_object_is_refusedinTestFetchUritesting trailing slashes (gs://bucket/,s3://bucket/prefix/,gs://bucket//) and bare bucket names (gs://bucket,s3://bucket).ruff.Validation
uv run pytest -q tests/test_storage.py(44 passed, 1 skipped)uv run ruff check src/hflow/storage.py tests/test_storage.pyuv run ruff format --check src/hflow/storage.py tests/test_storage.py